The invention relates to a process for the preparation of arylamides of heteroaromatic carboxylic acids by the reaction of heteroaromatic halogen compounds with carbon monoxide and aromatic amines in the presence of a catalyst and a base. It further relates to a process for the preparation of arylamides of heteroaromatic carboxylic acids which carry an aryloxy or heteroaryloxy group as a substituent on the heteroaromatic ring, by the reaction of heteroaromatic dihalogen compounds with aromatic or heteroaromatic hydroxyl compounds to give (hetero)aryloxy-substituted heteroaromatic monohalogen compounds, and the further reaction of these compounds with carbon monoxide and aromatic amines in the presence of a catalyst and a base.
The amides which can be prepared according to the invention have the general formula: 
in which:
A1 is nitrogen or CR1,
A2 is nitrogen or CR2,
A3 is nitrogen or CR3,
A4 is nitrogen or CR4, and
A5 is nitrogen or CR5,
with the proviso that at least one of the ring members A1 to A5 is nitrogen and that two nitrogen atoms are not bonded directly to one another;
R1 to R5, if present, independently of one another are hydrogen, C1-4-alkyl or aryl, one of the substituents R1 to R5 being a group of the formula xe2x80x94OR, in which R is an optionally substituted aromatic or heteroaromatic radical;
R6 is hydrogen or C1-4-alkyl; and
R7 is an optionally substituted aromatic or heteroaromatic radical.
Such amides include especially the arylamides of pyridine-, pyrimidine-, pyrazine- and 1,3,5-triazine-carboxylic acids.
Numerous compounds of the structure of Formula 1, especially those in which one of the substituents R1 to R5 is an aryloxy group (xe2x80x94OR) adjacent to a ring nitrogen atom, are important herbicides (WO-A 94/27974, European Published Patent Application No. 0,053,011, and European Published Patent Application No. 0,447,004). These known compounds are conventionally synthesized from the corresponding carboxylic acids or carboxylic acid derivatives (acid chlorides, esters, and nitriles), although these are often difficult to obtain and, consequently, expensive.
The main object of the invention is to provide an alternative process which is based on more readily obtainable educts. Other objects and advantages of the invention are set out herein or are obvious herefrom to one skilled in the art. The objects and advantages of the invention are achieved by the process of the invention.
The invention involves a process for the preparation of amides of the general formula: 
in which
A1 is nitrogen or CR1,
A2 is nitrogen or CR2,
A3 is nitrogen or CR3,
A4 is nitrogen or CR4, and
A5 is nitrogen or CR5,
with the proviso that at least one of the ring members A1 to A5 is nitrogen and that two nitrogen atoms are not bonded directly to one another;
R1 to R5, if present, independently of one another are hydrogen, C1-4-alkyl or aryl, one of the substituents R1 to R5 being a group of the formula xe2x80x94OR, in which R is an optionally substituted aromatic or heteroaromatic radical;
R6 is hydrogen or C1-4-alkyl; and
R7is an optionally substituted aromatic or heteroaromatic radical, comprising reacting a halogen compound of the general formula: 
in which A1 to A5 are as defined above and X is chlorine, bromine or iodine, with carbon monoxide and an amine of the general formula:
R6xe2x80x94NHxe2x80x94R7xe2x80x83xe2x80x83III,
in which R6 and R7 are as defined above, in the presence of a complex of palladium with a diphosphine of the general formula:
R8R9Pxe2x80x94[CH2]nxe2x80x94PR10R11xe2x80x83xe2x80x83IV,
in which R8 to R11 independently of one another are phenyl or substituted phenyl and n is 3 or 4, and with a base.
Preferably, in Formulae I and II, A2 is nitrogen and part of a pyridine ring. Preferably, in Formulae I and II, R1 is a group of the formula xe2x80x94OR.
Also preferably, in Formulae I and II, A1 is nitrogen and part of a pyridine ring.
Also preferably, in Formulae I and II, A1 and A5 are nitrogen and part of a pyrimidine ring.
Also preferably, in Formulae I and II, A1 and A4 are nitrogen and part of a pyrazine ring.
Preferably, in Formulae I and II, A1, A3 and A5 are nitrogen.
In each of the last four preferable embodiments listed just above, preferably, in Formulae I and II, R2 is a group of the formula xe2x80x94OR.
Preferably, in Formulae I and II, R is an optionally substituted phenyl group, in Formulae I and III, R6 is hydrogen and R7 is an optionally substituted phenyl group.
Preferably, in Formula II, X is chlorine.
Preferably, the diphosphine (IV) used is 1,3-bis(diphenylphosphino)propane or 1,4-bis(diphenylphosphino)butane.
The invention also involves a process for the preparation of amides of the general formula: 
in which A1 to A5, R6 and R7 are as defined above, comprising, in a first step, reacting a dihalide of the general formula: 
in which A1 to A5 are as defined above with the proviso that one of the radicals R1 to R5 on a carbon atom adjacent to a ring nitrogen atom is replaced with Z, Z is chlorine, bromine or iodine and X independently thereof is chlorine, bromine or iodine, with an aromatic or heteroaromatic hydroxyl compound of the general formula:
Rxe2x80x94OHxe2x80x83xe2x80x83VI,
in which R is as defined above, to give a (hetero)aryloxy halogen compound of the general formula: 
in which A1 to A5, and X are as defined above, and, in a second step, reacting said product with carbon monoxide and an amine of the general formula:
R6xe2x80x94NHxe2x80x94R7xe2x80x83xe2x80x83III,
in which R6 and R7 are as defined above, in the presence of a complex of palladium with a diphosphine of the general formula:
R8R9Pxe2x80x94[CH2]nxe2x80x94PR10R11xe2x80x83xe2x80x83IV
in which R8 to R11 and n are as defined above and with a base.
It has been found that halogen compounds of the general formula: 
in which A1 to A5 are as defined above and X is chlorine, bromine or iodine, react directly with carbon monoxide and a primary or secondary amine of the general formula:
R6xe2x80x94NHxe2x80x94R7xe2x80x83xe2x80x83III,
in which R6 and R7 are as defined above, in the presence of a base, to give good to almost quantitative yields of the desired products (I) if a complex of palladium with a diphosphine of the general formula:
R8R9Pxe2x80x94[CH2]nxe2x80x94PR10R11xe2x80x83xe2x80x83IV
is present as a catalyst. In the general formula IV, R8 to R11 independently of one another are phenyl or substituted phenyl and n is 3 or 4.
Herein, C1-4-alkyl is to be understood as meaning any linear or branched primary, secondary or tertiary alkyl group having up to 4 carbon atoms e.g., methyl or ethyl. Herein, aromatic or heteroaromatic radicals are to be understood as meaning especially monocyclic or polycyclic systems, such as, phenyl, naphthyl, biphenylyl, anthracenyl, furyl, pyrrolyl, pyrazolyl, thiophenyl, pyridyl, indolyl or quinolinlyl. These radicals can carry one or more identical or different substituents, for example, lower alkyl groups such as methyl, halogenated alkyl groups such as trifluoromethyl, lower alkoxy groups such as methoxy, or lower alkylthio (alkanesulphanyl) or alkanesulphonyl groups such as methylthio or ethanesulphonyl. Substituted phenyl is understood as meaning especially groups such as (p-)fluorophenyl, (p-)tolyl or (p-)trifluoromethylphenyl.
The halogen compounds (II) used as starting materials are known compounds or can be prepared analogously to known compounds. Numerous compounds of this type have been published, for example, in U.S. Pat. No. 4,254,125 and European Published Patent Application No. 0,001,187.
The halogen compounds (II) in which the group of the formula xe2x80x94OR is bonded to a carbon atom adjacent to a ring nitrogen atom are advantageously prepared by a process in which a dihalide or the general formula: 
in which A1 to A5 are as defined above, with the proviso that one of the radicals R1 to R5 on a carbon atom adjacent to a ring nitrogen atom is replaced with Z, Z is chlorine, bromine or iodine and X independently thereof is chlorine, bromine or iodine, is reacted with an aromatic or heteroaromatic hydroxyl compound of the general formula:
Rxe2x80x94OHxe2x80x83xe2x80x83VI,
in which R is as defined above. The two-stage process comprising this reaction in combination with the following reaction with carbon monoxide and the amine (III), in the manner described above, is a further subject of the invention; the preferred embodiments described herein and below also are applicable to the two-stage process.
The process according to the invention is preferentially suitable for the preparation of amides (I) in which A2 is nitrogen and forms a pyridine ring with the remaining ring members. Amides (I) in which R1 is a group of the formula xe2x80x94OR, R being as defined above, are particularly preferred.
Other preferred amides (I) are:
those in which A1 is nitrogen and forms a pyridine ring with the remaining ring members,
those in which A1 and A5 are nitrogen and form a pyrimidine ring with the remaining ring members,
those in which A1 and A4 are nitrogen and form a pyrazine ring with the remaining ring members, and
those in which A1, A3 and A5 are nitrogen and form a 1,3,5-triazine ring with the remaining ring members. In the last four classes, those amides in which R2 is a group of the formula xe2x80x94OR, R being as defined above, are in turn particularly preferred. Other preferred amides (I) are those in which R is an optionally substituted phenyl group. This applies especially to the above-mentioned amides containing a pyridine, pyrimidine, pyrazine or 1,3,5-triazine ring in which R1 or R2 is a group of the formula xe2x80x94OR. Other preferred amides are those in which R6 is hydrogen and R7 is an optionally substituted phenyl group.
Preferred halogen compounds (II).are the chlorine compounds (X=Cl).
The catalytically active palladium diphosphine complex is advantageously formed in situ by a process in which palladium in finely divided elemental form (e.g., palladium on activated charcoal), a Pd(II) salt (e.g., the chloride or the acetate) or a suitable Pd(II) complex (e.g., dichlorobis(triphenylphosphine)palladium(II)) is reacted with the diphosphine. The palladium is preferably used in an amount of 0.02 to 0.2 mol percent of Pd(II) or 0.5 to 2 mol percent of Pd(0) (as Pd/C), based in each case on the halogen compound (II). The diphosphine is advantageously used in excess (based on Pd), preferably in an amount of 0.2 to 5 mol percent, again based on the halogen compound (II).
The solvents used can be either relatively nonpolar, for example, toluene or xylene, or polar, for example, acetonitrile, tetrahydrofuran or N,N-dimethylacetamide.
The base used is preferably a relatively weak base, which does not need to be soluble in the solvent used. Examples of suitable bases are carbonates such as sodium carbonate or potassium carbonate, or acetates such as sodium acetate. Particularly good results have been achieved with sodium acetate.
The reaction temperature is preferably 80xc2x0 to 250xc2x0 C.
The carbon monoxide pressure is preferably 1 to 50 bar.